package NewTablePanels;

import javax.swing.*;

public class NewSeatsTable extends JPanel {

	private JPanel leftPart;
	private JPanel rightPart;
	
	private JLabel seatNumberLabel;
	
	private JTextField seatNumberField;
	
	public NewSeatsTable()
	{
		seatNumberLabel = new JLabel("Seatnumber: ");
		
		seatNumberField = new JTextField(20);
		
		leftPart = new JPanel();
		rightPart = new JPanel();
		
		leftPart.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		rightPart.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		
		fillLeftPart();
		fillRightPart();
		
		this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
		this.add(leftPart);
		this.add(rightPart);
		this.setVisible(false);
	}
	
	private void fillLeftPart()
	{
		leftPart.add(seatNumberLabel);
	}
	
	private void fillRightPart()
	{
		rightPart.add(seatNumberField);
	}
}
